To achieve the properties of simplicity, robustness, maintainability, testability, suitability for
software modification, readability and comprehensibility in the software unit implement and to ensure that the
following correspond to the software architectural design:-
Correct order of execution of subprograms and functions
Consistency of interfaces between software units
Correctness of control and data flow between and within the sw units
The design principles for software unit design and implementation are highly dependent on the ASIL
level of the element being developed, these principles and there applicability to different ASIL levels are
detailed below. The principles of
One entry and one exit point in subprograms and functionsa is highly recommended for
items of all ASIL levels
No dynamic objects or variables, or else online test during their creation a,b is
highly recommended for items of ASIL B,C or D and recommended for items of ASIL A
Initialization of variables is highly recommended for items of all ASIL levels
No multiple use of variable namesais highly recommended for items of ASIL B,C or D
and recommended for items of ASIL A
Avoid global variables or else justify their usagea is highly recommended for items
of ASIL C or D and recommended for items of ASIL A or B
Limited use of pointersa is highly recommended for items of ASIL D and
recommended for items of ASIL B or C, with an unbiased opinion
on its usage for items of ASIL A
No implicit type conversionsa,b is highly recommended for items of ASIL B,C or D and
recommended for items of ASIL A
No hidden data flow or control flow c is highly recommended for items of ASIL B,C or
D and recommended for items of ASIL A
No unconditional jumpsa,b,c is highly recommended for items of all ASIL
levels
No recursions is highly recommended for items of ASIL C or D and recommended for items of ASIL
A or B
Notes
a:- May not be applicable for graphical modeling notations used in model-based
development.
b:- Can be applied at the source code level. These methods are applicable both to manual code
development and to model based development.
c:- These methods can be part of Formal verification, static code analysis or semantic code
analysis
d :- This method is used for mathematical analysis of source by use of an abstract
representation of possible values for the variable. For this it is not necessary to translate and execute the
source code.
This information is a summary of the information taken from ISO 26262 vol 6 clause 8.4.4 table
8, Design principles for software unit design and implementation
To help with the development of this specification it is possible to use model based methods, in which case the
specification model provides the basis for the implementation. See Detailed Design - RT which also starts to go into unit
test.
|